import sys

k = {}
for i in sys.stdin:
    jian, zhi = i.split(':')
    zhi = zhi.strip('\n')
    k[jian] = zhi
a = sorted(k.items(), key=lambda x: x[0])
for j in a:
    print(j[0], end=' ')


